<extend name="Public/base" />
<block name="content">
<style type="text/css">
.checkbox{ height:24px; background:#eee; padding-right:20px; width:190px; overflow:hidden; }
</style>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i
				class="icon-home"></i> 首页</a> <a href="{:U('Auth/merchant')}"
				class="tip-bottom">商户权限</a><a href="javascript:void(0);"
				class="current">{$meta_title}</a>
		</div>
	</div>
	<form class="form-horizontal auth-form">
	<div class="container-fluid" style="margin-top:15px;">
        <div class="row-fluid">
        	<if condition="$member_id eq 0">
			<select class="form-control" style="width:200px;" name="member_id" id="member_id" autocomplete="off">
				<option value=0>选择员工</option>
				<volist name="member" id="vo">
					<option value='{$vo.uid}'>{$vo.login_name|strip_tags}</option>
				</volist>
			</select>
			<else/>
			员工：{$member_id|getUserName}<input type="hidden" name="member_id" value="{$member_id}" >
			</if>
        </div>
    </div>
	<div class="container-fluid">
		<br>
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box" style="overflow:hidden">
            		<div class="widget-content">
						<volist name="_list" id="vo">
							<label class="checkbox"><input class="auth_rules rules_all" type="checkbox" id="merchant_{$vo.merchant_id}" name="rules[]" value="{$vo.merchant_id}" >{$vo.merchant_name}</label>
						</volist>
					<br>
					<br>
					<button type="submit" class="btn btn-success ajax-post" url="{:U('Auth/merchantAuth')}" target-form="auth-form">确 定</button>
					<button class="btn btn-danger" onclick="javascript:history.back(-1);return false;">返 回</button>
					</div>
				</div>
			</div>
			<div class="row-fluid"></div>
		</div>
	</div>
	</form>
<script type="text/javascript">
$(function(){
	<notempty name="merchant_arr">
		<volist name="merchant_arr" id="vo">
			$('#merchant_{$vo}').prop('checked', true);
		</volist>
	</notempty>
});

highlight_subnav("{:U('Auth/merchant')}");
</script>
</block>
